<!DOCTYPE html>
<html>
    <head>
        <title>demo</title>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
        <style>
            body {
                font-family: Monospace;
                background-color: #f0f0f0;
                margin: 0px;
                overflow: hidden;
            }
        </style>
    </head>
    <body>
        <script src="https://cdn.bootcdn.net/ajax/libs/three.js/73/three.js"></script>
        <script src="https://cdn.bootcdn.net/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
        <script src="https://cdn.bootcdn.net/ajax/libs/tween.js/0.11.0/Tween.min.js"></script>
		<script src="https://unpkg.com/three@0.73.1/examples/js/controls/TrackballControls.js"></script>
        <script src="https://cdn.bootcdn.net/ajax/libs/stats.js/10/Stats.min.js"></script>
        <script>

            var jsonstr = '[{"boxId":"94267880101G312","x":-78.199997,"y":-55.799999,"z":-558.299988,"width":75.400002,"height":115.400002,"length":75.400002,"weight":96.000000,"platform":"platform46","order":1,"material":"","type":1,"place":100},{"boxId":"94267880101G108","x":-2.800000,"y":-55.799999,"z":-558.299988,"width":75.400002,"height":115.400002,"length":75.400002,"weight":96.000000,"platform":"platform46","order":2,"material":"","type":1,"place":100},{"boxId":"94267880101G371","x":72.599998,"y":-55.799999,"z":-558.299988,"width":75.400002,"height":115.400002,"length":75.400002,"weight":96.000000,"platform":"platform46","order":3,"material":"","type":1,"place":100},{"boxId":"94267880101G350","x":-78.199997,"y":-55.799999,"z":-482.899994,"width":75.400002,"height":115.400002,"length":75.400002,"weight":96.000000,"platform":"platform46","order":4,"material":"","type":1,"place":100},{"boxId":"94267880101G360","x":-2.800000,"y":-55.799999,"z":-482.899994,"width":75.400002,"height":115.400002,"length":75.400002,"weight":96.000000,"platform":"platform46","order":5,"material":"","type":1,"place":100},{"boxId":"94267880101G322","x":72.599998,"y":-55.799999,"z":-482.899994,"width":75.400002,"height":115.400002,"length":75.400002,"weight":96.000000,"platform":"platform46","order":6,"material":"","type":1,"place":100},{"boxId":"94267880101G341","x":-78.199997,"y":-55.799999,"z":-407.500000,"width":75.400002,"height":115.400002,"length":75.400002,"weight":96.000000,"platform":"platform46","order":7,"material":"","type":1,"place":100},{"boxId":"94267880101G380","x":-2.800000,"y":-55.799999,"z":-407.500000,"width":75.400002,"height":115.400002,"length":75.400002,"weight":96.000000,"platform":"platform46","order":8,"material":"","type":1,"place":100},{"boxId":"94267880101G331","x":72.599998,"y":-55.799999,"z":-407.500000,"width":75.400002,"height":115.400002,"length":75.400002,"weight":96.000000,"platform":"platform46","order":9,"material":"","type":1,"place":100},{"boxId":"94267880101G081","x":-87.400002,"y":11.900000,"z":-567.500000,"width":57.000000,"height":20.000000,"length":57.000000,"weight":49.400002,"platform":"platform07","order":10,"material":"","type":1,"place":100},{"boxId":"94267880101G314","x":-93.900002,"y":47.400002,"z":-568.250000,"width":44.000000,"height":51.000000,"length":55.500000,"weight":137.000000,"platform":"platform07","order":11,"material":"","type":1,"place":100},{"boxId":"94267880101G110","x":-36.900002,"y":27.400000,"z":-568.250000,"width":44.000000,"height":51.000000,"length":55.500000,"weight":137.000000,"platform":"platform07","order":12,"material":"","type":1,"place":100},{"boxId":"94267880101G373","x":-36.900002,"y":78.400002,"z":-568.250000,"width":44.000000,"height":51.000000,"length":55.500000,"weight":137.000000,"platform":"platform07","order":13,"material":"","type":1,"place":100},{"boxId":"94267880101G352","x":7.100000,"y":27.400000,"z":-568.250000,"width":44.000000,"height":51.000000,"length":55.500000,"weight":137.000000,"platform":"platform07","order":14,"material":"","type":1,"place":100},{"boxId":"94267880101G362","x":7.100000,"y":78.400002,"z":-568.250000,"width":44.000000,"height":51.000000,"length":55.500000,"weight":137.000000,"platform":"platform07","order":15,"material":"","type":1,"place":100},{"boxId":"94267880101G324","x":51.099998,"y":27.400000,"z":-568.250000,"width":44.000000,"height":51.000000,"length":55.500000,"weight":137.000000,"platform":"platform07","order":16,"material":"","type":1,"place":100},{"boxId":"94267880101G343","x":51.099998,"y":78.400002,"z":-568.250000,"width":44.000000,"height":51.000000,"length":55.500000,"weight":137.000000,"platform":"platform07","order":17,"material":"","type":1,"place":100},{"boxId":"94267880101G382","x":-36.900002,"y":27.400000,"z":-512.750000,"width":44.000000,"height":51.000000,"length":55.500000,"weight":137.000000,"platform":"platform07","order":18,"material":"","type":1,"place":100},{"boxId":"94267880101G333","x":-36.900002,"y":78.400002,"z":-512.750000,"width":44.000000,"height":51.000000,"length":55.500000,"weight":137.000000,"platform":"platform07","order":19,"material":"","type":1,"place":100},{"boxId":"94267880101G313","x":7.100000,"y":27.400000,"z":-512.750000,"width":44.000000,"height":51.000000,"length":55.500000,"weight":137.000000,"platform":"platform07","order":20,"material":"","type":1,"place":100},{"boxId":"94267880101G109","x":7.100000,"y":78.400002,"z":-512.750000,"width":44.000000,"height":51.000000,"length":55.500000,"weight":137.000000,"platform":"platform07","order":21,"material":"","type":1,"place":100},{"boxId":"94267880101G372","x":51.099998,"y":27.400000,"z":-512.750000,"width":44.000000,"height":51.000000,"length":55.500000,"weight":137.000000,"platform":"platform07","order":22,"material":"","type":1,"place":100},{"boxId":"94267880101G351","x":51.099998,"y":78.400002,"z":-512.750000,"width":44.000000,"height":51.000000,"length":55.500000,"weight":137.000000,"platform":"platform07","order":23,"material":"","type":1,"place":100},{"boxId":"94267880101G361","x":-93.900002,"y":27.400000,"z":-457.250000,"width":44.000000,"height":51.000000,"length":55.500000,"weight":137.000000,"platform":"platform07","order":24,"material":"","type":1,"place":100},{"boxId":"94267880101G323","x":-93.900002,"y":78.400002,"z":-457.250000,"width":44.000000,"height":51.000000,"length":55.500000,"weight":137.000000,"platform":"platform07","order":25,"material":"","type":1,"place":100},{"boxId":"94267880101G342","x":-49.900002,"y":27.400000,"z":-457.250000,"width":44.000000,"height":51.000000,"length":55.500000,"weight":137.000000,"platform":"platform07","order":26,"material":"","type":1,"place":100},{"boxId":"94267880101G381","x":-49.900002,"y":78.400002,"z":-457.250000,"width":44.000000,"height":51.000000,"length":55.500000,"weight":137.000000,"platform":"platform07","order":27,"material":"","type":1,"place":100},{"boxId":"94267880101G332","x":-5.900000,"y":27.400000,"z":-457.250000,"width":44.000000,"height":51.000000,"length":55.500000,"weight":137.000000,"platform":"platform07","order":28,"material":"","type":1,"place":100},{"boxId":"94267880101G468","x":90.599998,"y":7.900000,"z":-578.500000,"width":35.000000,"height":12.000000,"length":35.000000,"weight":17.980000,"platform":"platform07","order":29,"material":"","type":1,"place":100},{"boxId":"94267880101G448","x":90.599998,"y":19.900000,"z":-578.500000,"width":35.000000,"height":12.000000,"length":35.000000,"weight":17.400000,"platform":"platform07","order":30,"material":"","type":1,"place":100},{"boxId":"94267880101G586","x":89.849998,"y":39.150002,"z":-575.750000,"width":33.500000,"height":26.500000,"length":40.500000,"weight":5.800000,"platform":"platform08","order":31,"material":"","type":1,"place":100},{"boxId":"94267880101G592","x":89.849998,"y":65.650002,"z":-575.750000,"width":33.500000,"height":26.500000,"length":40.500000,"weight":5.800000,"platform":"platform08","order":32,"material":"","type":1,"place":100},{"boxId":"94267880101G594","x":89.849998,"y":92.150002,"z":-575.750000,"width":33.500000,"height":26.500000,"length":40.500000,"weight":5.800000,"platform":"platform08","order":33,"material":"","type":1,"place":100},{"boxId":"94267880101G588","x":89.849998,"y":15.150000,"z":-535.250000,"width":33.500000,"height":26.500000,"length":40.500000,"weight":5.850000,"platform":"platform08","order":34,"material":"","type":1,"place":100},{"boxId":"94267880101G593","x":89.849998,"y":41.650002,"z":-535.250000,"width":33.500000,"height":26.500000,"length":40.500000,"weight":5.800000,"platform":"platform08","order":35,"material":"","type":1,"place":100},{"boxId":"94267880101G590","x":89.849998,"y":68.150002,"z":-535.250000,"width":33.500000,"height":26.500000,"length":40.500000,"weight":5.750000,"platform":"platform08","order":36,"material":"","type":1,"place":100},{"boxId":"94267880101G587","x":89.849998,"y":94.650002,"z":-535.250000,"width":33.500000,"height":26.500000,"length":40.500000,"weight":5.850000,"platform":"platform08","order":37,"material":"","type":1,"place":100},{"boxId":"94267880101G589","x":89.849998,"y":15.150000,"z":-494.750000,"width":33.500000,"height":26.500000,"length":40.500000,"weight":5.800000,"platform":"platform08","order":38,"material":"","type":1,"place":100},{"boxId":"94267880101G591","x":89.849998,"y":41.650002,"z":-494.750000,"width":33.500000,"height":26.500000,"length":40.500000,"weight":5.750000,"platform":"platform08","order":39,"material":"","type":1,"place":100},{"boxId":"94267880101G228","x":-75.900002,"y":-54.450001,"z":-309.799988,"width":80.000000,"height":118.099998,"length":120.000000,"weight":133.000000,"platform":"platform09","order":40,"material":"","type":1,"place":100},{"boxId":"94267880101G227","x":4.100000,"y":-54.450001,"z":-309.799988,"width":80.000000,"height":118.099998,"length":120.000000,"weight":133.000000,"platform":"platform09","order":41,"material":"","type":1,"place":100},{"boxId":"94267880101G267","x":-75.900002,"y":-54.799999,"z":-189.800003,"width":80.000000,"height":117.400002,"length":120.000000,"weight":143.000000,"platform":"platform09","order":42,"material":"","type":1,"place":100},{"boxId":"94267880101G265","x":4.100000,"y":-54.799999,"z":-189.800003,"width":80.000000,"height":117.400002,"length":120.000000,"weight":139.500000,"platform":"platform09","order":43,"material":"","type":1,"place":100},{"boxId":"94267880101G226","x":-75.900002,"y":-55.150002,"z":-69.800003,"width":80.000000,"height":116.699997,"length":120.000000,"weight":134.000000,"platform":"platform09","order":44,"material":"","type":1,"place":100},{"boxId":"94267880101G266","x":4.100000,"y":-55.150002,"z":-69.800003,"width":80.000000,"height":116.699997,"length":120.000000,"weight":138.000000,"platform":"platform09","order":45,"material":"","type":1,"place":100},{"boxId":"94267880101G462","x":-75.900002,"y":54.849998,"z":-309.799988,"width":80.000000,"height":100.500000,"length":120.000000,"weight":106.500000,"platform":"platform09","order":46,"material":"","type":1,"place":100},{"boxId":"94267880101G474","x":4.100000,"y":49.200001,"z":-309.799988,"width":80.000000,"height":89.199997,"length":120.000000,"weight":137.000000,"platform":"platform09","order":47,"material":"","type":1,"place":100},{"boxId":"94267880101G264","x":-75.900002,"y":45.299999,"z":-189.800003,"width":80.000000,"height":82.800003,"length":120.000000,"weight":103.000000,"platform":"platform09","order":48,"material":"","type":1,"place":100},{"boxId":"94267880101G447","x":4.100000,"y":28.000000,"z":-189.800003,"width":80.000000,"height":48.200001,"length":120.000000,"weight":55.000000,"platform":"platform09","order":49,"material":"","type":1,"place":100},{"boxId":"94267880101G296","x":79.599998,"y":39.150002,"z":-430.500000,"width":71.000000,"height":74.500000,"length":88.000000,"weight":70.500000,"platform":"platform09","order":50,"material":"","type":1,"place":100},{"boxId":"94267880101G441","x":79.599998,"y":-76.250000,"z":-325.799988,"width":71.000000,"height":74.500000,"length":88.000000,"weight":58.500000,"platform":"platform09","order":51,"material":"","type":1,"place":100},{"boxId":"94267880101G080","x":-77.400002,"y":57.299999,"z":-91.300003,"width":77.000000,"height":108.199997,"length":77.000000,"weight":179.500000,"platform":"platform09","order":52,"material":"","type":1,"place":100},{"boxId":"94267880101G079","x":-0.400000,"y":50.599998,"z":-91.300003,"width":77.000000,"height":94.800003,"length":77.000000,"weight":152.500000,"platform":"platform09","order":53,"material":"","type":1,"place":100},{"boxId":"94267880101G423","x":-77.400002,"y":-72.099998,"z":28.700001,"width":77.000000,"height":82.800003,"length":77.000000,"weight":77.000000,"platform":"platform09","order":54,"material":"","type":1,"place":100},{"boxId":"94267880101G422","x":-77.400002,"y":10.350000,"z":28.700001,"width":77.000000,"height":82.099998,"length":77.000000,"weight":80.000000,"platform":"platform09","order":55,"material":"","type":1,"place":100},{"boxId":"94267880101G256","x":-0.400000,"y":-73.849998,"z":28.700001,"width":77.000000,"height":79.300003,"length":77.000000,"weight":90.500000,"platform":"platform09","order":56,"material":"","type":1,"place":100},{"boxId":"94267880101G449","x":-0.400000,"y":-2.700000,"z":28.700001,"width":77.000000,"height":63.000000,"length":77.000000,"weight":43.000000,"platform":"platform09","order":57,"material":"","type":1,"place":100},{"boxId":"94267880101G420","x":-0.400000,"y":60.299999,"z":28.700001,"width":77.000000,"height":63.000000,"length":77.000000,"weight":132.000000,"platform":"platform09","order":58,"material":"","type":1,"place":100},{"boxId":"94267880101G245","x":72.099998,"y":-9.750000,"z":-325.799988,"width":56.000000,"height":58.500000,"length":88.000000,"weight":86.000000,"platform":"platform09","order":59,"material":"","type":1,"place":100},{"boxId":"94267880101G469","x":74.099998,"y":-54.099998,"z":-241.800003,"width":60.000000,"height":118.800003,"length":80.000000,"weight":109.000000,"platform":"platform09","order":60,"material":"","type":1,"place":100},{"boxId":"94267880101G083","x":74.099998,"y":-54.099998,"z":-161.800003,"width":60.000000,"height":118.800003,"length":80.000000,"weight":98.000000,"platform":"platform09","order":61,"material":"","type":1,"place":100},{"boxId":"94267880101G463","x":74.099998,"y":61.250000,"z":-329.799988,"width":60.000000,"height":83.500000,"length":80.000000,"weight":42.000000,"platform":"platform09","order":62,"material":"","type":1,"place":100},{"boxId":"94267880101G421","x":74.099998,"y":47.049999,"z":-241.800003,"width":60.000000,"height":83.500000,"length":80.000000,"weight":60.500000,"platform":"platform09","order":63,"material":"","type":1,"place":100},{"boxId":"94267880101G478","x":72.099998,"y":41.799999,"z":-165.300003,"width":56.000000,"height":73.000000,"length":73.000000,"weight":171.699997,"platform":"platform09","order":64,"material":"","type":1,"place":100},{"boxId":"94267880101G477","x":72.099998,"y":-77.000000,"z":-85.300003,"width":56.000000,"height":73.000000,"length":73.000000,"weight":171.399994,"platform":"platform09","order":65,"material":"","type":1,"place":100},{"boxId":"94267880101G238","x":64.349998,"y":-3.750000,"z":-82.550003,"width":40.500000,"height":73.500000,"length":78.500000,"weight":15.000000,"platform":"platform09","order":66,"material":"","type":1,"place":100},{"boxId":"94267880101G300","x":64.349998,"y":69.750000,"z":-89.550003,"width":40.500000,"height":73.500000,"length":78.500000,"weight":14.500000,"platform":"platform09","order":67,"material":"","type":1,"place":100},{"boxId":"94267880101G263","x":64.349998,"y":-94.250000,"z":-4.050000,"width":40.500000,"height":38.500000,"length":78.500000,"weight":11.500000,"platform":"platform09","order":68,"material":"","type":1,"place":100},{"boxId":"94267880101G303","x":64.349998,"y":-55.750000,"z":-4.050000,"width":40.500000,"height":38.500000,"length":78.500000,"weight":16.500000,"platform":"platform09","order":69,"material":"","type":1,"place":100},{"boxId":"94267880101G090","x":64.349998,"y":-17.250000,"z":-4.050000,"width":40.500000,"height":38.500000,"length":78.500000,"weight":20.500000,"platform":"platform09","order":70,"material":"","type":1,"place":100},{"boxId":"94267880101G476","x":69.099998,"y":12.500000,"z":-18.299999,"width":50.000000,"height":21.000000,"length":50.000000,"weight":60.099998,"platform":"platform09","order":71,"material":"","type":1,"place":100},{"boxId":"94267880101G258","x":63.099998,"y":30.500000,"z":-18.299999,"width":50.000000,"height":15.000000,"length":50.000000,"weight":58.830002,"platform":"platform09","order":72,"material":"","type":1,"place":100},{"boxId":"94267880101G299","x":63.099998,"y":45.500000,"z":-25.299999,"width":50.000000,"height":15.000000,"length":50.000000,"weight":57.889999,"platform":"platform09","order":73,"material":"","type":1,"place":100},{"boxId":"94267880101G261","x":63.099998,"y":60.500000,"z":-25.299999,"width":50.000000,"height":15.000000,"length":50.000000,"weight":56.880001,"platform":"platform09","order":74,"material":"","type":1,"place":100},{"boxId":"94267880101G251","x":63.099998,"y":75.500000,"z":-25.299999,"width":50.000000,"height":15.000000,"length":50.000000,"weight":58.750000,"platform":"platform09","order":75,"material":"","type":1,"place":100},{"boxId":"94267880101G407","x":62.099998,"y":91.500000,"z":-26.299999,"width":48.000000,"height":17.000000,"length":48.000000,"weight":13.770000,"platform":"platform09","order":76,"material":"","type":1,"place":100},{"boxId":"94267880101G259","x":-14.900000,"y":100.300003,"z":21.700001,"width":48.000000,"height":17.000000,"length":48.000000,"weight":13.770000,"platform":"platform09","order":77,"material":"","type":1,"place":100},{"boxId":"94267880101G311","x":57.400002,"y":-106.400002,"z":64.800003,"width":38.599998,"height":14.200000,"length":59.200001,"weight":8.000000,"platform":"platform09","order":78,"material":"","type":1,"place":100},{"boxId":"94267880101G107","x":57.400002,"y":-92.199997,"z":64.800003,"width":38.599998,"height":14.200000,"length":59.200001,"weight":7.800000,"platform":"platform09","order":79,"material":"","type":1,"place":100},{"boxId":"94267880101G370","x":57.400002,"y":-78.000000,"z":64.800003,"width":38.599998,"height":14.200000,"length":59.200001,"weight":7.800000,"platform":"platform09","order":80,"material":"","type":1,"place":100},{"boxId":"94267880101G349","x":57.400002,"y":-63.799999,"z":64.800003,"width":38.599998,"height":14.200000,"length":59.200001,"weight":7.800000,"platform":"platform09","order":81,"material":"","type":1,"place":100},{"boxId":"94267880101G359","x":57.400002,"y":-49.599998,"z":64.800003,"width":38.599998,"height":14.200000,"length":59.200001,"weight":7.800000,"platform":"platform09","order":82,"material":"","type":1,"place":100},{"boxId":"94267880101G321","x":57.400002,"y":-35.400002,"z":64.800003,"width":38.599998,"height":14.200000,"length":59.200001,"weight":8.000000,"platform":"platform09","order":83,"material":"","type":1,"place":100},{"boxId":"94267880101G340","x":57.400002,"y":-21.200001,"z":64.800003,"width":38.599998,"height":14.200000,"length":59.200001,"weight":7.800000,"platform":"platform09","order":84,"material":"","type":1,"place":100},{"boxId":"94267880101G379","x":57.400002,"y":-7.000000,"z":64.800003,"width":38.599998,"height":14.200000,"length":59.200001,"weight":7.800000,"platform":"platform09","order":85,"material":"","type":1,"place":100},{"boxId":"94267880101G330","x":57.400002,"y":7.200000,"z":64.800003,"width":38.599998,"height":14.200000,"length":59.200001,"weight":7.800000,"platform":"platform09","order":86,"material":"","type":1,"place":100},{"boxId":"94267880101G248","x":26.200001,"y":97.800003,"z":30.799999,"width":34.200001,"height":12.000000,"length":66.199997,"weight":4.520000,"platform":"platform09","order":87,"material":"","type":1,"place":100},{"boxId":"94267880101G253","x":60.400002,"y":20.299999,"z":68.300003,"width":34.200001,"height":12.000000,"length":66.199997,"weight":4.120000,"platform":"platform09","order":88,"material":"","type":1,"place":100},{"boxId":"94267880101G078","x":64.550003,"y":36.549999,"z":61.450001,"width":42.500000,"height":20.500000,"length":52.500000,"weight":7.940000,"platform":"platform09","order":89,"material":"","type":1,"place":100},{"boxId":"94267880101G412","x":62.299999,"y":64.550003,"z":61.700001,"width":38.000000,"height":35.500000,"length":53.000000,"weight":8.080000,"platform":"platform09","order":90,"material":"","type":1,"place":100},{"boxId":"94267880101F688","x":64.300003,"y":92.300003,"z":56.200001,"width":42.000000,"height":20.000000,"length":42.000000,"weight":51.330002,"platform":"platform09","order":91,"material":"","type":1,"place":100},{"boxId":"94267880101G262","x":-94.900002,"y":-103.500000,"z":122.400002,"width":42.000000,"height":20.000000,"length":42.000000,"weight":52.250000,"platform":"platform09","order":92,"material":"","type":1,"place":100},{"boxId":"94267880101G082","x":96.250000,"y":-102.150002,"z":107.000000,"width":37.500000,"height":22.700001,"length":37.599998,"weight":5.300000,"platform":"platform09","order":93,"material":"","type":1,"place":100},{"boxId":"94267880101G246","x":96.250000,"y":-79.449997,"z":107.000000,"width":37.500000,"height":22.700001,"length":37.599998,"weight":5.300000,"platform":"platform09","order":94,"material":"","type":1,"place":100},{"boxId":"94267880101G475","x":95.949997,"y":-49.700001,"z":106.900002,"width":36.900002,"height":36.799999,"length":37.400002,"weight":9.460000,"platform":"platform09","order":95,"material":"","type":1,"place":100},{"boxId":"94267880101G235","x":95.750000,"y":-19.549999,"z":106.949997,"width":36.500000,"height":23.500000,"length":37.500000,"weight":6.380000,"platform":"platform09","order":96,"material":"","type":1,"place":100},{"boxId":"94267880101D389","x":95.750000,"y":3.950000,"z":106.949997,"width":36.500000,"height":23.500000,"length":37.500000,"weight":2.320000,"platform":"platform09","order":97,"material":"","type":1,"place":100},{"boxId":"94267880101G406","x":95.750000,"y":27.450001,"z":106.949997,"width":36.500000,"height":23.500000,"length":37.500000,"weight":6.960000,"platform":"platform09","order":98,"material":"","type":1,"place":100},{"boxId":"94267880101G249","x":95.750000,"y":50.950001,"z":106.949997,"width":36.500000,"height":23.500000,"length":37.500000,"weight":6.950000,"platform":"platform09","order":99,"material":"","type":1,"place":100},{"boxId":"94267880101G084","x":95.750000,"y":74.449997,"z":106.949997,"width":36.500000,"height":23.500000,"length":37.500000,"weight":2.320000,"platform":"platform09","order":100,"material":"","type":1,"place":100},{"boxId":"94267880101G452","x":95.750000,"y":94.949997,"z":106.449997,"width":36.500000,"height":17.500000,"length":37.500000,"weight":14.120000,"platform":"platform09","order":101,"material":"","type":1,"place":100},{"boxId":"94267880101G257","x":-55.650002,"y":-104.750000,"z":144.550003,"width":36.500000,"height":17.500000,"length":37.500000,"weight":12.420000,"platform":"platform09","order":102,"material":"","type":1,"place":100},{"boxId":"94267880101G295","x":-55.650002,"y":-87.250000,"z":144.550003,"width":36.500000,"height":17.500000,"length":37.500000,"weight":5.450000,"platform":"platform09","order":103,"material":"","type":1,"place":100},{"boxId":"94267880101G405","x":-55.650002,"y":-69.750000,"z":144.550003,"width":36.500000,"height":17.500000,"length":37.500000,"weight":13.000000,"platform":"platform09","order":104,"material":"","type":1,"place":100},{"boxId":"94267880101G298","x":-55.650002,"y":-52.250000,"z":144.449997,"width":36.500000,"height":17.500000,"length":37.500000,"weight":12.160000,"platform":"platform09","order":105,"material":"","type":1,"place":100},{"boxId":"94267880101G304","x":-55.650002,"y":-34.750000,"z":144.449997,"width":36.500000,"height":17.500000,"length":37.500000,"weight":7.320000,"platform":"platform09","order":106,"material":"","type":1,"place":100},{"boxId":"94267880101G470","x":-56.150002,"y":-21.000000,"z":144.949997,"width":35.500000,"height":10.000000,"length":38.500000,"weight":5.800000,"platform":"platform09","order":107,"material":"","type":1,"place":100},{"boxId":"94267880101F782","x":-56.150002,"y":-11.000000,"z":144.949997,"width":35.500000,"height":10.000000,"length":38.500000,"weight":4.460000,"platform":"platform09","order":108,"material":"","type":1,"place":100},{"boxId":"94267880101G310","x":-56.150002,"y":-1.000000,"z":144.949997,"width":35.500000,"height":10.000000,"length":38.500000,"weight":1.350000,"platform":"platform09","order":109,"material":"","type":1,"place":100},{"boxId":"94267880101G106","x":-56.150002,"y":9.000000,"z":144.949997,"width":35.500000,"height":10.000000,"length":38.500000,"weight":1.350000,"platform":"platform09","order":110,"material":"","type":1,"place":100},{"boxId":"94267880101G255","x":-56.150002,"y":19.000000,"z":144.949997,"width":35.500000,"height":10.000000,"length":38.500000,"weight":5.100000,"platform":"platform09","order":111,"material":"","type":1,"place":100},{"boxId":"94267880101G369","x":-56.150002,"y":29.000000,"z":144.949997,"width":35.500000,"height":10.000000,"length":38.500000,"weight":1.400000,"platform":"platform09","order":112,"material":"","type":1,"place":100},{"boxId":"94267880101G348","x":-56.150002,"y":39.000000,"z":144.949997,"width":35.500000,"height":10.000000,"length":38.500000,"weight":1.350000,"platform":"platform09","order":113,"material":"","type":1,"place":100},{"boxId":"94267880101G358","x":-56.150002,"y":49.000000,"z":144.949997,"width":35.500000,"height":10.000000,"length":38.500000,"weight":1.400000,"platform":"platform09","order":114,"material":"","type":1,"place":100},{"boxId":"94267880101G320","x":-56.150002,"y":59.000000,"z":144.949997,"width":35.500000,"height":10.000000,"length":38.500000,"weight":1.400000,"platform":"platform09","order":115,"material":"","type":1,"place":100},{"boxId":"94267880101G339","x":-56.150002,"y":69.000000,"z":144.949997,"width":35.500000,"height":10.000000,"length":38.500000,"weight":1.400000,"platform":"platform09","order":116,"material":"","type":1,"place":100},{"boxId":"94267880101G378","x":-56.150002,"y":79.000000,"z":144.949997,"width":35.500000,"height":10.000000,"length":38.500000,"weight":1.400000,"platform":"platform09","order":117,"material":"","type":1,"place":100},{"boxId":"94267880101G329","x":-56.150002,"y":89.000000,"z":144.949997,"width":35.500000,"height":10.000000,"length":38.500000,"weight":1.400000,"platform":"platform09","order":118,"material":"","type":1,"place":100},{"boxId":"94267880101G473","x":-56.150002,"y":99.000000,"z":144.449997,"width":35.500000,"height":10.000000,"length":38.500000,"weight":1.760000,"platform":"platform09","order":119,"material":"","type":1,"place":100},{"boxId":"94267880101G260","x":-19.650000,"y":-108.500000,"z":145.050003,"width":35.500000,"height":10.000000,"length":38.500000,"weight":1.560000,"platform":"platform09","order":120,"material":"","type":1,"place":100},{"boxId":"94267880101G250","x":-19.650000,"y":-98.500000,"z":145.050003,"width":35.500000,"height":10.000000,"length":38.500000,"weight":1.580000,"platform":"platform09","order":121,"material":"","type":1,"place":100},{"boxId":"94267880101G244","x":-19.650000,"y":-88.500000,"z":145.050003,"width":35.500000,"height":10.000000,"length":38.500000,"weight":3.840000,"platform":"platform09","order":122,"material":"","type":1,"place":100},{"boxId":"94267880101G408","x":-19.650000,"y":-78.500000,"z":145.050003,"width":35.500000,"height":10.000000,"length":38.500000,"weight":5.100000,"platform":"platform09","order":123,"material":"","type":1,"place":100},{"boxId":"94267880101G252","x":-19.650000,"y":-68.500000,"z":145.050003,"width":35.500000,"height":10.000000,"length":38.500000,"weight":4.540000,"platform":"platform09","order":124,"material":"","type":1,"place":100},{"boxId":"94267880101G401","x":20.350000,"y":108.449997,"z":8.950000,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.950000,"platform":"platform09","order":125,"material":"","type":1,"place":100},{"boxId":"94267880101G394","x":20.350000,"y":108.449997,"z":46.450001,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.950000,"platform":"platform09","order":126,"material":"","type":1,"place":100},{"boxId":"94267880101G387","x":88.750000,"y":108.449997,"z":106.449997,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.950000,"platform":"platform09","order":127,"material":"","type":1,"place":100},{"boxId":"94267880101G336","x":-62.650002,"y":108.750000,"z":143.949997,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.950000,"platform":"platform09","order":128,"material":"","type":1,"place":100},{"boxId":"94267880101G389","x":-26.150000,"y":-58.750000,"z":144.449997,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.950000,"platform":"platform09","order":129,"material":"","type":1,"place":100},{"boxId":"94267880101G393","x":-26.150000,"y":-49.250000,"z":144.449997,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.950000,"platform":"platform09","order":130,"material":"","type":1,"place":100},{"boxId":"94267880101G400","x":-26.150000,"y":-39.750000,"z":144.449997,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.950000,"platform":"platform09","order":131,"material":"","type":1,"place":100},{"boxId":"94267880101G375","x":-26.150000,"y":-30.250000,"z":144.449997,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.950000,"platform":"platform09","order":132,"material":"","type":1,"place":100},{"boxId":"94267880101G309","x":-27.150000,"y":-20.750000,"z":144.449997,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.950000,"platform":"platform09","order":133,"material":"","type":1,"place":100},{"boxId":"94267880101G399","x":-27.150000,"y":-11.250000,"z":144.449997,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.950000,"platform":"platform09","order":134,"material":"","type":1,"place":100},{"boxId":"94267880101G222","x":-27.150000,"y":-1.750000,"z":144.449997,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.950000,"platform":"platform09","order":135,"material":"","type":1,"place":100},{"boxId":"94267880101G319","x":-27.150000,"y":7.750000,"z":144.449997,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.950000,"platform":"platform09","order":136,"material":"","type":1,"place":100},{"boxId":"94267880101G397","x":-27.150000,"y":17.250000,"z":144.449997,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.950000,"platform":"platform09","order":137,"material":"","type":1,"place":100},{"boxId":"94267880101G366","x":-27.150000,"y":26.750000,"z":144.449997,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.950000,"platform":"platform09","order":138,"material":"","type":1,"place":100},{"boxId":"94267880101G391","x":-27.150000,"y":36.250000,"z":144.449997,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.950000,"platform":"platform09","order":139,"material":"","type":1,"place":100},{"boxId":"94267880101G354","x":-27.150000,"y":45.750000,"z":144.449997,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.950000,"platform":"platform09","order":140,"material":"","type":1,"place":100},{"boxId":"94267880101G345","x":-27.150000,"y":55.250000,"z":144.449997,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.950000,"platform":"platform09","order":141,"material":"","type":1,"place":100},{"boxId":"94267880101G357","x":-27.150000,"y":64.750000,"z":144.449997,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.950000,"platform":"platform09","order":142,"material":"","type":1,"place":100},{"boxId":"94267880101G384","x":-27.150000,"y":74.250000,"z":144.449997,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.950000,"platform":"platform09","order":143,"material":"","type":1,"place":100},{"boxId":"94267880101G327","x":-27.150000,"y":83.750000,"z":144.449997,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.900000,"platform":"platform09","order":144,"material":"","type":1,"place":100},{"boxId":"94267880101G386","x":-27.150000,"y":93.250000,"z":143.949997,"width":22.500000,"height":9.500000,"length":37.500000,"weight":4.120000,"platform":"platform09","order":145,"material":"","type":1,"place":100},{"boxId":"94267880101G367","x":-27.150000,"y":102.750000,"z":143.949997,"width":22.500000,"height":9.500000,"length":37.500000,"weight":4.120000,"platform":"platform09","order":146,"material":"","type":1,"place":100},{"boxId":"94267880101G398","x":9.350000,"y":-108.750000,"z":144.550003,"width":22.500000,"height":9.500000,"length":37.500000,"weight":4.140000,"platform":"platform09","order":147,"material":"","type":1,"place":100},{"boxId":"94267880101G392","x":9.350000,"y":-99.250000,"z":144.550003,"width":22.500000,"height":9.500000,"length":37.500000,"weight":4.120000,"platform":"platform09","order":148,"material":"","type":1,"place":100},{"boxId":"94267880101G328","x":9.350000,"y":-89.750000,"z":144.550003,"width":22.500000,"height":9.500000,"length":37.500000,"weight":4.120000,"platform":"platform09","order":149,"material":"","type":1,"place":100},{"boxId":"94267880101G346","x":9.350000,"y":-80.250000,"z":144.550003,"width":22.500000,"height":9.500000,"length":37.500000,"weight":4.120000,"platform":"platform09","order":150,"material":"","type":1,"place":100},{"boxId":"94267880101G377","x":9.350000,"y":-70.750000,"z":144.550003,"width":22.500000,"height":9.500000,"length":37.500000,"weight":4.120000,"platform":"platform09","order":151,"material":"","type":1,"place":100},{"boxId":"94267880101G318","x":9.350000,"y":-61.250000,"z":144.449997,"width":22.500000,"height":9.500000,"length":37.500000,"weight":4.140000,"platform":"platform09","order":152,"material":"","type":1,"place":100},{"boxId":"94267880101G065","x":9.350000,"y":-51.750000,"z":144.449997,"width":22.500000,"height":9.500000,"length":37.500000,"weight":4.120000,"platform":"platform09","order":153,"material":"","type":1,"place":100},{"boxId":"94267880101G308","x":9.350000,"y":-42.250000,"z":144.449997,"width":22.500000,"height":9.500000,"length":37.500000,"weight":4.160000,"platform":"platform09","order":154,"material":"","type":1,"place":100},{"boxId":"94267880101G364","x":9.350000,"y":-32.750000,"z":144.449997,"width":22.500000,"height":9.500000,"length":37.500000,"weight":4.140000,"platform":"platform09","order":155,"material":"","type":1,"place":100},{"boxId":"94267880101G390","x":9.350000,"y":-23.250000,"z":144.449997,"width":22.500000,"height":9.500000,"length":37.500000,"weight":4.120000,"platform":"platform09","order":156,"material":"","type":1,"place":100},{"boxId":"94267880101G388","x":9.350000,"y":-13.750000,"z":144.449997,"width":22.500000,"height":9.500000,"length":37.500000,"weight":4.140000,"platform":"platform09","order":157,"material":"","type":1,"place":100},{"boxId":"94267880101G337","x":9.350000,"y":-4.250000,"z":144.449997,"width":22.500000,"height":9.500000,"length":37.500000,"weight":4.120000,"platform":"platform09","order":158,"material":"","type":1,"place":100},{"boxId":"94267880101G396","x":9.350000,"y":5.250000,"z":144.449997,"width":22.500000,"height":9.500000,"length":37.500000,"weight":4.140000,"platform":"platform09","order":159,"material":"","type":1,"place":100},{"boxId":"94267880101G395","x":9.350000,"y":14.750000,"z":144.449997,"width":22.500000,"height":9.500000,"length":37.500000,"weight":4.120000,"platform":"platform09","order":160,"material":"","type":1,"place":100},{"boxId":"94267880101G355","x":9.350000,"y":24.250000,"z":144.449997,"width":22.500000,"height":9.500000,"length":37.500000,"weight":4.120000,"platform":"platform09","order":161,"material":"","type":1,"place":100},{"boxId":"94267880101G315","x":58.299999,"y":-55.799999,"z":163.500000,"width":75.400002,"height":115.400002,"length":75.400002,"weight":66.000000,"platform":"platform02","order":162,"material":"","type":1,"place":100},{"boxId":"94267880101G111","x":-78.199997,"y":-55.799999,"z":238.899994,"width":75.400002,"height":115.400002,"length":75.400002,"weight":66.000000,"platform":"platform02","order":163,"material":"","type":1,"place":100},{"boxId":"94267880101G374","x":-2.800000,"y":-55.799999,"z":238.899994,"width":75.400002,"height":115.400002,"length":75.400002,"weight":66.000000,"platform":"platform02","order":164,"material":"","type":1,"place":100},{"boxId":"94267880101G353","x":72.599998,"y":-55.799999,"z":238.899994,"width":75.400002,"height":115.400002,"length":75.400002,"weight":66.000000,"platform":"platform02","order":165,"material":"","type":1,"place":100},{"boxId":"94267880101G363","x":-78.199997,"y":-55.799999,"z":314.299988,"width":75.400002,"height":115.400002,"length":75.400002,"weight":66.000000,"platform":"platform02","order":166,"material":"","type":1,"place":100},{"boxId":"94267880101G325","x":-2.800000,"y":-55.799999,"z":314.299988,"width":75.400002,"height":115.400002,"length":75.400002,"weight":66.000000,"platform":"platform02","order":167,"material":"","type":1,"place":100},{"boxId":"94267880101G344","x":72.599998,"y":-55.799999,"z":314.299988,"width":75.400002,"height":115.400002,"length":75.400002,"weight":66.000000,"platform":"platform02","order":168,"material":"","type":1,"place":100},{"boxId":"94267880101G383","x":-78.199997,"y":-55.799999,"z":389.700012,"width":75.400002,"height":115.400002,"length":75.400002,"weight":66.000000,"platform":"platform02","order":169,"material":"","type":1,"place":100},{"boxId":"94267880101G334","x":-2.800000,"y":-55.799999,"z":389.700012,"width":75.400002,"height":115.400002,"length":75.400002,"weight":66.000000,"platform":"platform02","order":170,"material":"","type":1,"place":100}]';
			var jsonstr2 = '{"container_length":1192.000000,"container_width":231.800003,"container_height":227.000000,"container_max_load":23000.000000,"container_type_name":"40GP"}'
            var objectArray= JSON.parse(jsonstr);
			var truckJsonObj = JSON.parse(jsonstr2);
            var container, stats;
            var camera, controls, scene, projector, renderer;
            var objects = [], plane;
            var mouse = new THREE.Vector2(), offset = new THREE.Vector3(), INTERSECTED, SELECTED; 
            init();
            animate();
            function init() {
                container = document.createElement( 'div' );
                document.body.appendChild( container );
                camera = new THREE.PerspectiveCamera( 70, window.innerWidth / window.innerHeight, 1, 10000 );
                camera.position.x = -600;
                camera.position.y = 400;
                camera.position.z = 1000;
                controls = new THREE.TrackballControls( camera );
                controls.rotateSpeed = 1.0;
                controls.zoomSpeed = 1.2;
                controls.panSpeed = 0.8;
                controls.noZoom = false;
                controls.noPan = true;
                controls.staticMoving = false;
                controls.dynamicDampingFactor = 0.3;
                scene = new THREE.Scene();
                var ambientLight = new THREE.AmbientLight( Math.random() *0xffffff );
                scene.add( ambientLight );
                var directionalLight = new THREE.DirectionalLight( Math.random() * 0xffffff );
                directionalLight.position.set( 0, 1, 0 );
                scene.add( directionalLight );
                var pointLight = new THREE.PointLight( 0xff0000, 1, 500 );
                pointLight.position.set( 0, 0, -200 );
                scene.add( pointLight );

                container_length = truckJsonObj.container_length;
                container_width = truckJsonObj.container_width;
                container_height = truckJsonObj.container_height;
                var cube_1 = new THREE.Mesh(
                    new THREE.BoxGeometry( container_width, container_height, container_length, 1,1,1 ), 
                    new THREE.MeshBasicMaterial( { color:0xefb73e, wireframe:true } )
                );
                cube_1.position.x = 0;
                cube_1.position.y = 0;
                cube_1.position.z = 0;
                scene.add( cube_1 );

                truck_head_length = 145;
                var truck_head_1 = new THREE.Mesh(
                    new THREE.BoxGeometry( 200, 100, truck_head_length, 1, 1, 5 ), 
                    new THREE.MeshBasicMaterial( { color: 0xffffff, wireframe:true } )
                );
                truck_head_1.position.x = 0;
                truck_head_1.position.y = -50;
                truck_head_1.position.z = -(container_length/2 + truck_head_length/2);
                scene.add( truck_head_1 );
                
                truck_head_length_2 = 80;
                var truck_head_2 = new THREE.Mesh(
                    new THREE.BoxGeometry( 170, 60, truck_head_length_2, 1, 0, 5 ), 
                    new THREE.MeshBasicMaterial( { color: 0xffffff, wireframe:true } )
                );
                truck_head_2.position.x = 0;
                truck_head_2.position.y = 30;
                truck_head_2.position.z = -(container_length/2 + truck_head_length_2/2);
                scene.add( truck_head_2 );
                
                truck_head_chimney_radius = 7;
                var truck_head_chimney1 = new THREE.Mesh(
                    new THREE.CylinderGeometry( truck_head_chimney_radius, truck_head_chimney_radius, 300, 20 ), 
                    new THREE.MeshBasicMaterial( { color:0xffffff, wireframe:true } )
                );
                truck_head_chimney1.position.x = 100;
                truck_head_chimney1.position.y = 50;
                truck_head_chimney1.position.z = -(container_length/2 + truck_head_chimney_radius/2);
                scene.add( truck_head_chimney1 );
                
                var truck_head_chimney2 = new THREE.Mesh(
                    new THREE.CylinderGeometry( truck_head_chimney_radius, truck_head_chimney_radius, 300, 20 ), 
                    new THREE.MeshBasicMaterial( { color:0xffffff, wireframe:true } )
                );
                truck_head_chimney2.position.x = -100;
                truck_head_chimney2.position.y = 50;
                truck_head_chimney2.position.z = -(container_length/2 + truck_head_chimney_radius/2);
                scene.add( truck_head_chimney2 );
        
                var truck_wheel_1 = new THREE.Mesh(new THREE.CylinderGeometry( 50, 50, 20, 50 ), 
                    new THREE.MeshBasicMaterial( { color:0xffffff, wireframe:true } )
                );
                truck_wheel_1.position.x = 110;
                truck_wheel_1.position.y = -100;
                truck_wheel_1.position.z = -(container_length/2 + truck_head_length_2/2 + 20) ;
                truck_wheel_1.rotation.x = 0;
                truck_wheel_1.rotation.y = 0;
                truck_wheel_1.rotation.z = 1.6;
                scene.add( truck_wheel_1 );
                
                var truck_wheel_2 = new THREE.Mesh(new THREE.CylinderGeometry( 50, 50, 20, 50 ), 
                    new THREE.MeshBasicMaterial( { color:0xffffff, wireframe:true } )
                );
                truck_wheel_2.position.x = -110;
                truck_wheel_2.position.y = -100;
                truck_wheel_2.position.z = -(container_length/2 + truck_head_length_2/2 + 20);
                truck_wheel_2.rotation.x = 0;
                truck_wheel_2.rotation.y = 0;
                truck_wheel_2.rotation.z = 1.6;
                scene.add( truck_wheel_2 );

                offset_2 = -240;
                var truck_wheel_5 = new THREE.Mesh(new THREE.CylinderGeometry( 50, 50, 20, 50 ), 
                    new THREE.MeshBasicMaterial( { color:0xffffff, wireframe:true } )
                );
                truck_wheel_5.position.x = container_width/2 + 5;
                truck_wheel_5.position.y = -100;
                truck_wheel_5.position.z = (container_length/2 + truck_head_length_2/2 + offset_2) ;
                truck_wheel_5.rotation.x = 0;
                truck_wheel_5.rotation.y = 0;
                truck_wheel_5.rotation.z = 1.6;
                scene.add( truck_wheel_5 );

                var truck_wheel_6 = new THREE.Mesh(new THREE.CylinderGeometry( 50, 50, 20, 50 ), 
                    new THREE.MeshBasicMaterial( { color:0xffffff, wireframe:true } )
                );
                truck_wheel_6.position.x = -container_width/2 - 5;
                truck_wheel_6.position.y = -100;
                truck_wheel_6.position.z = (container_length/2 + truck_head_length_2/2 + offset_2);
                truck_wheel_6.rotation.x = 0;
                truck_wheel_6.rotation.y = 0;
                truck_wheel_6.rotation.z = 1.6;
                scene.add( truck_wheel_6 );

                for (var i in objectArray) {
                    if (objectArray[i].type==2) {
						var cylinderTopR = objectArray[i].length / 2;
						var cylinderHeight = objectArray[i].height;
						if (objectArray[i].place == 1 || objectArray[i].place == 2)
						{
							cylinderHeight = objectArray[i].width;
						}
						
                        var object2 = new THREE.Mesh(
						    new THREE.CylinderGeometry(cylinderTopR, cylinderTopR, cylinderHeight, 60),
                            new THREE.MeshBasicMaterial( { color: Math.random() * 0xffffff , wireframe:false } ) 
                        ); 
                        object2.position.x = objectArray[i].x;
                        object2.position.y = objectArray[i].y;
                        object2.position.z = objectArray[i].z;
                        if (objectArray[i].place==1) {
                            object2.rotation.z = 55;
                        }
                        if (objectArray[i].place==2) {
                            object2.rotation.x = 55;
                        }
                        object2.width = objectArray[i].width;
                        object2.height = objectArray[i].height;
                        object2.length = objectArray[i].length;
                        object2.weight = objectArray[i].weight;
                        object2.platform = objectArray[i].platform;
                        object2.order = objectArray[i].order;
                        object2.materialInfo = objectArray[i].material;
                        object2.boxId = objectArray[i].boxId;
                        object2.type = objectArray[i].type;
                        object2.place = objectArray[i].place;
                        scene.add( object2 );
                        objects.push( object2 );
                    }
                    if (objectArray[i].type==1) {
						if (objectArray[i].place == 200)
						{
							var box_length = objectArray[i].width;
                            var box_width = objectArray[i].length;
						}
						else
						{
							var box_length = objectArray[i].length;
							var box_width = objectArray[i].width;
						}
						var box_height = objectArray[i].height;
                        var object = new THREE.Mesh(
                            new THREE.BoxGeometry( box_width, box_height, box_length, 1, 1, 1 ), 
                            new THREE.MeshBasicMaterial( { color: Math.random() * 0xffffff , wireframe:false } ) 
                        ); 
                        object.position.x = objectArray[i].x;
                        object.position.y = objectArray[i].y;
                        object.position.z = objectArray[i].z;
						object.length = objectArray[i].length;
						object.width = objectArray[i].width;
						object.height = objectArray[i].height;
                        object.weight = objectArray[i].weight;
                        object.platform = objectArray[i].platform;
                        object.order = objectArray[i].order;
                        object.materialInfo = objectArray[i].material;
                        object.boxId = objectArray[i].boxId;
                        object.type = objectArray[i].type;
                        object.place = objectArray[i].place;
                        scene.add( object );
                        objects.push( object );
                    }
                }

                plane = new THREE.Mesh(
                    new THREE.PlaneGeometry( 2000, 2000, 8, 8 ),
                    new THREE.MeshBasicMaterial( { color: 0x000000, opacity: 0.25, transparent: true, wireframe: true } )
                );
                plane.visible = true;
                scene.add( plane );
                projector = new THREE.Projector();
                renderer = new THREE.WebGLRenderer( { antialias: true } );
                renderer.sortObjects = false;
                renderer.setSize( window.innerWidth, window.innerHeight );
                renderer.shadowMapEnabled = true;
                renderer.shadowMapType = THREE.PCFShadowMap;
                container.appendChild( renderer.domElement );

                stats = new Stats();
                stats.domElement.style.position = 'absolute';
                stats.domElement.style.top = '0px';
                container.appendChild( stats.domElement );

                window.addEventListener( 'resize', onWindowResize, false );
                renderer.domElement.addEventListener( 'mousemove', onDocumentMouseMove, false );
                renderer.domElement.addEventListener( 'mousedown', onDocumentMouseDown, false );
                renderer.domElement.addEventListener( 'mouseup', onDocumentMouseUp, false );
            }

            function onDocumentMouseMove( event ) {
                event.preventDefault();
                mouse.x = ( event.clientX / window.innerWidth ) * 2 - 1;
                mouse.y = - ( event.clientY / window.innerHeight ) * 2 + 1;
                var vector = new THREE.Vector3( mouse.x, mouse.y, 0.5 );
                projector.unprojectVector( vector, camera );
                var raycaster = new THREE.Raycaster( camera.position, vector.sub( camera.position ).normalize() );
                var intersects = raycaster.intersectObjects( objects );
                if ( intersects.length > 0 ) {
                    if ( INTERSECTED != intersects[ 0 ].object ) {
                        INTERSECTED = intersects[ 0 ].object;
                        plane.position.copy( INTERSECTED.position );
                        plane.lookAt( camera.position );
                    }
                    container.style.cursor = 'pointer';
                } else {
                    container.style.cursor = 'auto';
                }
            }

            function onDocumentMouseDown( event ) {
                event.preventDefault();
                var vector = new THREE.Vector3( mouse.x, mouse.y, 0.5 );
                projector.unprojectVector( vector, camera );
                var raycaster = new THREE.Raycaster( camera.position, vector.sub( camera.position ).normalize() );
                var intersects = raycaster.intersectObjects( objects );
                if ( intersects.length > 0 ) {
                    controls.enabled = false;  
                    SELECTED = intersects[ 0 ].object;
                    var info = '<B>' + 
                        'boxId: ' + SELECTED.boxId +
                        '</br> x: ' + SELECTED.position.x + 
                        '</br> y: ' + SELECTED.position.y + 
                        '</br> z: ' + SELECTED.position.z + 
                        '</br> width: ' + SELECTED.width + 
                        '</br> height: ' + SELECTED.height + 
                        '</br> length: ' + SELECTED.length + 
                        '</br> weight: ' + SELECTED.weight +
                        '</br> platform: ' + SELECTED.platform +
                        '</br> order: ' + SELECTED.order +
                        '</br> material: ' + SELECTED.materialInfo + 
                        '</br> type: ' + SELECTED.type + 
                        '</br> place: ' + SELECTED.place + 
                        '</B>' +
                        '</br>' + 
                        '--------------------------' + 
                        '</br>' +
                        'type(1:箱体 2:圆柱体)' +
                        '</br>' +
                        'place(1:品字型 2:田字型)';
                    $("#objectInfo").html(info);
                }
            }

            function onDocumentMouseUp( event ) {
                event.preventDefault();
                controls.enabled = true;
                if ( INTERSECTED ) {
                    plane.position.copy( INTERSECTED.position );
                    SELECTED = null;
                }
                container.style.cursor = 'auto';
            }

            function onWindowResize() {
                camera.aspect = window.innerWidth / window.innerHeight;
                camera.updateProjectionMatrix();
                renderer.setSize( window.innerWidth, window.innerHeight );
            }

            function animate() {
                requestAnimationFrame( animate );
                render();
                stats.update();
            }

            function render() {
                controls.update();
                renderer.render( scene, camera );
            }

        </script>
        <div id="objectInfo" class="a2"><br/>点击物体获取相关属性</div>
        <style>
            .a2{position:absolute; left:20px; top:50px; bottom:0px; width:180px; height:250px; z-index:9999; background: #00FFFF; font-weight:bold; }
        </style>
    </body>
</html>